/**
 * 充值接口
 */
import request from "../request.js";
import url from "../../url/url.js";
import { data } from "jquery";

export default {
    /**
     * 获取充值记录 
     */
    rechargeRecordList(data) {
        return request({
            url: url.baseUrl + "/order/rechargeRecordList?pageSize=" + data.pageSize + "&pageNum=" + data.pageNum,
            method: "POST",
            data: {
                userId: data.userId
            }
        });
    },
    /**
     * 充值
     * @param {*} data
     * @returns http://localhost:5000/wxPay/pay?money=0.01&userId=107&body=微信充值
     */
    wxPay(data) {
        return request({
            url: url.baseUrl + "/wxPay/pay",
            method: "get",
            params: data
        });
    },
    /**
     * 收益充值 /order/earnings
     */
    orderEarnings(data) {
        return request({
            url: url.baseUrl + "/order/earnings",
            method: "POST",
            data: data
        });
    },
    /**
     * 支付宝充值 /aliPay/code
     */
    aliPayCode(data) {
        return request({
            url: 'http://2ygpa5476l.shhttp.cn/aliPay/code',
            //url: url.baseUrl + "/aliPay/code",
            params: data,
            method: "GET"
        });
    }
}